﻿package com.dg.gaming.api.common{

	/**
	 * ...
	 * @author ...
	 */
	public class GameOver extends IGameOver {

		private var players:Array;
		private var results:Array;
		private var oldRatings:Array;
		private var newRatings:Array;


		/**
		 * Constructor which takes a list of players, results, old
		 * and new ratings.
		 *
		 * @param players     List of players.
		 * @param results     List of results.
		 * @param oldRatings  List of ratings before game.
		 * @param newRatings  List of ratings after game.
		 */
		public function GameOver(players:Array,results:Array,oldRatings:Array=null,newRatings:Array=null) {
			// Set fields
			this.players=players;
			this.results=results;
			this.oldRatings=oldRatings;
			this.newRatings=newRatings;
		}

		/**
		 * Return an integer array of new ratings.
		 *
		 * @return    New ratings.
		 */
		public function getNewRatings():Array {
			return newRatings;
		}

		/**
		 * Return an integer array of old ratings.
		 *
		 * @return    Old ratings.
		 */
		public function getOldRatings():Array {
			return oldRatings;
		}

		/**
		 * Return a String array of players who were playing.
		 *
		 * @return    Players.
		 */
		public function getPlayers():Array {
			return players;
		}

		/**
		 * Return an integer array of results.
		 *
		 * @return    Results.
		 */
		public function getResults():Array {
			return results;
		}
	}

}